﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using Magicodes.ExporterAndImporter.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 天气基础输入参数
/// </summary>
public class weatherBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 类型
    /// </summary>
    public virtual string? weather_type { get; set; }
    
    /// <summary>
    /// 时间
    /// </summary>
    public virtual DateTime? weather_occurrence_time { get; set; }
    
    /// <summary>
    /// 地点
    /// </summary>
    public virtual string? locationofweather_occurrence { get; set; }
    
    /// <summary>
    /// 范围
    /// </summary>
    public virtual string? weather_range { get; set; }
    
    /// <summary>
    /// 描述
    /// </summary>
    public virtual string? weather_description { get; set; }
    
}

/// <summary>
/// 天气分页查询输入参数
/// </summary>
public class PageweatherInput : BasePageInput
{
    /// <summary>
    /// 类型
    /// </summary>
    public string? weather_type { get; set; }
    
    /// <summary>
    /// 时间范围
    /// </summary>
     public DateTime?[] weather_occurrence_timeRange { get; set; }
    
    /// <summary>
    /// 地点
    /// </summary>
    public string? locationofweather_occurrence { get; set; }
    
    /// <summary>
    /// 范围
    /// </summary>
    public string? weather_range { get; set; }
    
    /// <summary>
    /// 描述
    /// </summary>
    public string? weather_description { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 天气增加输入参数
/// </summary>
public class AddweatherInput
{
    /// <summary>
    /// 类型
    /// </summary>
    [MaxLength(32, ErrorMessage = "类型字符长度不能超过32")]
    public string? weather_type { get; set; }
    
    /// <summary>
    /// 时间
    /// </summary>
    public DateTime? weather_occurrence_time { get; set; }
    
    /// <summary>
    /// 地点
    /// </summary>
    [MaxLength(32, ErrorMessage = "地点字符长度不能超过32")]
    public string? locationofweather_occurrence { get; set; }
    
    /// <summary>
    /// 范围
    /// </summary>
    [MaxLength(32, ErrorMessage = "范围字符长度不能超过32")]
    public string? weather_range { get; set; }
    
    /// <summary>
    /// 描述
    /// </summary>
    [MaxLength(32, ErrorMessage = "描述字符长度不能超过32")]
    public string? weather_description { get; set; }
    
}

/// <summary>
/// 天气删除输入参数
/// </summary>
public class DeleteweatherInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 天气更新输入参数
/// </summary>
public class UpdateweatherInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 类型
    /// </summary>    
    [MaxLength(32, ErrorMessage = "类型字符长度不能超过32")]
    public string? weather_type { get; set; }
    
    /// <summary>
    /// 时间
    /// </summary>    
    public DateTime? weather_occurrence_time { get; set; }
    
    /// <summary>
    /// 地点
    /// </summary>    
    [MaxLength(32, ErrorMessage = "地点字符长度不能超过32")]
    public string? locationofweather_occurrence { get; set; }
    
    /// <summary>
    /// 范围
    /// </summary>    
    [MaxLength(32, ErrorMessage = "范围字符长度不能超过32")]
    public string? weather_range { get; set; }
    
    /// <summary>
    /// 描述
    /// </summary>    
    [MaxLength(32, ErrorMessage = "描述字符长度不能超过32")]
    public string? weather_description { get; set; }
    
}

/// <summary>
/// 天气主键查询输入参数
/// </summary>
public class QueryByIdweatherInput : DeleteweatherInput
{
}

/// <summary>
/// 天气数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportweatherInput : BaseImportInput
{
    /// <summary>
    /// 类型
    /// </summary>
    [ImporterHeader(Name = "类型")]
    [ExporterHeader("类型", Format = "", Width = 25, IsBold = true)]
    public string? weather_type { get; set; }
    
    /// <summary>
    /// 时间
    /// </summary>
    [ImporterHeader(Name = "时间")]
    [ExporterHeader("时间", Format = "", Width = 25, IsBold = true)]
    public DateTime? weather_occurrence_time { get; set; }
    
    /// <summary>
    /// 地点
    /// </summary>
    [ImporterHeader(Name = "地点")]
    [ExporterHeader("地点", Format = "", Width = 25, IsBold = true)]
    public string? locationofweather_occurrence { get; set; }
    
    /// <summary>
    /// 范围
    /// </summary>
    [ImporterHeader(Name = "范围")]
    [ExporterHeader("范围", Format = "", Width = 25, IsBold = true)]
    public string? weather_range { get; set; }
    
    /// <summary>
    /// 描述
    /// </summary>
    [ImporterHeader(Name = "描述")]
    [ExporterHeader("描述", Format = "", Width = 25, IsBold = true)]
    public string? weather_description { get; set; }
    
}
